3.104 \(\int \frac {1}{a+i a \tan (c+d x)} \, dx\)

Optimal. Leaf size=33 \[ \frac {x}{2 a}+\frac {i}{2 d (a+i a \tan (c+d x))} \]

[Out]

1/2*x/a+1/2*I/d/(a+I*a*tan(d*x+c))

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 33, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {3479, 8} \[ \frac {x}{2 a}+\frac {i}{2 d (a+i a \tan (c+d x))} \]

Antiderivative was successfully verified.

[In]

Int[(a + I*a*Tan[c + d*x])^(-1),x]

[Out]

x/(2*a) + (I/2)/(d*(a + I*a*Tan[c + d*x]))

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3479

Int[((a_) + (b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(a*(a + b*Tan[c + d*x])^n)/(2*b*d*n), x] +
Dist[1/(2*a), Int[(a + b*Tan[c + d*x])^(n + 1), x], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 + b^2, 0] && LtQ[n
, 0]

Rubi steps

\begin {align*} \int \frac {1}{a+i a \tan (c+d x)} \, dx &=\frac {i}{2 d (a+i a \tan (c+d x))}+\frac {\int 1 \, dx}{2 a}\\ &=\frac {x}{2 a}+\frac {i}{2 d (a+i a \tan (c+d x))}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.11, size = 45, normalized size = 1.36 \[ \frac {(2 d x-i) \tan (c+d x)-2 i d x+1}{4 a d (\tan (c+d x)-i)} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + I*a*Tan[c + d*x])^(-1),x]

[Out]

(1 - (2*I)*d*x + (-I + 2*d*x)*Tan[c + d*x])/(4*a*d*(-I + Tan[c + d*x]))

________________________________________________________________________________________

fricas [A]  time = 0.56, size = 32, normalized size = 0.97 \[ \frac {{\left (2 \, d x e^{\left (2 i \, d x + 2 i \, c\right )} + i\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{4 \, a d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(d*x+c)),x, algorithm="fricas")

[Out]

1/4*(2*d*x*e^(2*I*d*x + 2*I*c) + I)*e^(-2*I*d*x - 2*I*c)/(a*d)

________________________________________________________________________________________

giac [B]  time = 0.40, size = 60, normalized size = 1.82 \[ -\frac {\frac {i \, \log \left (\tan \left (d x + c\right ) - i\right )}{a} - \frac {i \, \log \left (-i \, \tan \left (d x + c\right ) + 1\right )}{a} + \frac {-i \, \tan \left (d x + c\right ) - 3}{a {\left (\tan \left (d x + c\right ) - i\right )}}}{4 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(d*x+c)),x, algorithm="giac")

[Out]

-1/4*(I*log(tan(d*x + c) - I)/a - I*log(-I*tan(d*x + c) + 1)/a + (-I*tan(d*x + c) - 3)/(a*(tan(d*x + c) - I)))
/d

________________________________________________________________________________________

maple [B]  time = 0.11, size = 59, normalized size = 1.79 \[ \frac {i \ln \left (\tan \left (d x +c \right )+i\right )}{4 d a}-\frac {i \ln \left (\tan \left (d x +c \right )-i\right )}{4 d a}+\frac {1}{2 d a \left (\tan \left (d x +c \right )-i\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a+I*a*tan(d*x+c)),x)

[Out]

1/4*I/d/a*ln(tan(d*x+c)+I)-1/4*I/d/a*ln(tan(d*x+c)-I)+1/2/d/a/(tan(d*x+c)-I)

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(d*x+c)),x, algorithm="maxima")

[Out]

Exception raised: RuntimeError >> ECL says: Error executing code in Maxima: expt: undefined: 0 to a negative e
xponent.

________________________________________________________________________________________

mupad [B]  time = 3.36, size = 29, normalized size = 0.88 \[ \frac {x}{2\,a}+\frac {1{}\mathrm {i}}{2\,a\,d\,\left (1+\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a + a*tan(c + d*x)*1i),x)

[Out]

x/(2*a) + 1i/(2*a*d*(tan(c + d*x)*1i + 1))

________________________________________________________________________________________

sympy [A]  time = 0.15, size = 61, normalized size = 1.85 \[ \begin {cases} \frac {i e^{- 2 i c} e^{- 2 i d x}}{4 a d} & \text {for}\: 4 a d e^{2 i c} \neq 0 \\x \left (\frac {\left (e^{2 i c} + 1\right ) e^{- 2 i c}}{2 a} - \frac {1}{2 a}\right ) & \text {otherwise} \end {cases} + \frac {x}{2 a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(d*x+c)),x)

[Out]

Piecewise((I*exp(-2*I*c)*exp(-2*I*d*x)/(4*a*d), Ne(4*a*d*exp(2*I*c), 0)), (x*((exp(2*I*c) + 1)*exp(-2*I*c)/(2*
a) - 1/(2*a)), True)) + x/(2*a)

________________________________________________________________________________________